confusing math problem